<?php
namespace app\mobile\controller;
use think\session;

class Index extends Action
{
  public function index(){    
    $flashRes1 = db('ad')->where('cid',"=",13)->order("vieworder asc")->select();
    $flashRes2 = db('ad')->where('cid',"=",14)->order("vieworder asc")->select();
    $this->assign([
       "flashRes1" => $flashRes1,
       "flashRes2" => $flashRes2,
    ]);
    return view();
  }
  public function lst($cid=0,$sid=0){    
    if(request()->isPost()){
     $data = model("Files")->getMobileList();
     return $data;
    }  
    $type = db("type")->find($cid);
    $types = db("type")->find($sid);
    $this->assign([
       "type" => $type,
       "types" => $types,
    ]);
    return view();
  }
  public function show($id=0){   
    $news = model('Files')->getNewsShow($id);
    $this->assign([
       "news" => $news,
    ]);
    return view();
  }
  public function xiazai($id=0){   
    $news = model('Files')->getNewsShow($id);    
    $this->assign([
       "news" => $news,       
    ]);
    return view();
  }
}  

